<template>
  <h2>About组件内容</h2>
</template>

<script>
export default {
  name: "About",
  data() {
    return {}
  },
  // 通过路由规则，进入该组件时被调用
  beforeRouteEnter(to, from, next){
    if (localStorage.getItem('school') === 'abc') {
      next();
    } else {
      console.log("学校名称不对，无权限查看！");
    }
  },
  // 通过路由规则，离开该组件时被调用
  beforeRouteLeave(to, from, next){
    console.log('beforeRouteLeave');
    next();
  },
  props: [],
  computed: {},
  components: {},
  methods: {},
  mixins: [],
  watch: {},
  filters: {},
  directives: {}
}
</script>

<style scoped>

</style>